import request from "@/utils/request";

/** *
 *
 * 获取组织架构数据
 * **/
export function getOrganization() {
  return request({
    url: '/organization',
    method:'get'
  })
}
/***
 * 根据id删除部门
 *
 * */
export  function removeOrganization(id) {

  return request({
    url: `/organization/${id}`,
    method:'delete',

  })
}

/***
 * 根据id添加部门，id已经加载body里了
 *
 * */
export  function addOrganization(data){
  return request({
    url:`/organization`,
    method:'post',
    data:data
  })
}
/***
 * 根据id更新部门信息
 *
 * */

export  function editOrganization(id,data){
  return request({
    url:`organization/${id}`,
    method:'put',
    data:data

  })

}
